package com.song.dept.controller;

import com.song.dept.entity.Dept;
import com.song.dept.mapper.DeptMapper;
import com.song.dept.service.IDeptService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author tonysong
 * @since 2024-04-26
 */
@RestController
@RequestMapping("/system/dept")
public class DeptController {

    @Resource
    private IDeptService deptService;

    @GetMapping("/depts")
    public List<Dept>  getDepts(){
        return deptService.list();
    }

}
